/** 
 * File-Name:Config.java
 *
 * Created on 2010-12-21 下午05:15:16
 * 
 * @author: Neo (neolimeng@gmail.com)
 * Software Engineering Institute, Peking University, China
 * 
 * Copyright (c) 2009, Peking University
 * 
 *
 */
package neoutil;

import java.util.ResourceBundle;

/**
 * Description:
 * 
 * @author: Neo (neolimeng@gmail.com) Software Engineering Institute, Peking
 *          University, China
 * @version 1.0 2010-12-21 下午05:15:16
 */
public class Config {
	// 属性文件标识符
	private static String CONFIG_FILE_NAME = "app";

	// 所使用的ResourceBundle
	private static ResourceBundle bundle;

	// 静态私有方法，用于从属性文件中取得属性值
	static {
		try {
			bundle = ResourceBundle.getBundle(CONFIG_FILE_NAME);
		} catch (Exception e) {
			e.printStackTrace();
		}
	}

	// 静态私有方法，用于从属性文件中取得属性值
	private static String getValue(String key) {
		return bundle.getString(key);
	}

	public static String getDBUrl() {
		return getValue("jdbc.url");
	}

	public static String getDBUser() {
		return getValue("jdbc.username");
	}

	public static String getDBPassword() {
		return getValue("jdbc.password");
	}

	public static String getResumeSavePath() {
		return getValue("resumeSavePath");
	}

	public static void main(String[] args) {
	}

}
